﻿// This file is part of Code4Public (http://code4public.codeplex.com)
// Copyright 2011 Sina Iravanian - <sina@sinairv.com>
//
// This source file(s) may be redistributed, altered and customized
// by any means PROVIDING the authors name and all copyright
// notices remain intact.
// THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED. USE IT AT YOUR OWN RISK. THE AUTHOR ACCEPTS NO
// LIABILITY FOR ANY DATA DAMAGE/LOSS THAT THIS PRODUCT MAY CAUSE.
// ------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Code4Public.Settings;

namespace Code4Public.GUI
{
    public partial class ThemeEditorForm : Form
    {
        private Theme m_theme = null;
        public ThemeEditorForm()
        {
            InitializeComponent();
        }

        public ThemeEditorForm(Theme themeToEdit) : this()
        {
            m_theme = themeToEdit;
            themePreviewBox1.Theme = m_theme;
            themeDesigner1.SynchWithTheme(this.themePreviewBox1);
        }

        public static DialogResult ShowThemeEditorForm(Theme theme)
        {
            using (ThemeEditorForm frm = new ThemeEditorForm(theme))
            {
                return frm.ShowDialog();
            }
        }
    }
}
